﻿using JLPT.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace JLPT.Controllers
{
    public class HomeController : BaseController
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }

        public PartialViewResult SideBar()
        {
            MasterViewModel model = new MasterViewModel();
            model.Levels = db.Masters.Where(x => x.Code == "C001"); //Levels
            model.Types = db.Masters.Where(x => x.Code == "C002"); //Types

            return PartialView("_SideBarPartial", model);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";
            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";
            return View();
        }
    }
}
